package hy.day2_01;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/a")
public class A extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("a.......");
        System.out.println("a中收到参数："+req.getParameter("username"));
//        req.getRequestDispatcher("/b").forward(req,resp);
        resp.sendRedirect("/day2_01/b");
    }

}
